{% import "@WebsiteBundle/macros/pagination.html.twig" as macros %}
{% if list %}
	<div class="row row-deck row-cards">
		{% for item in list %}
			{% if item['img'] %}
				<div class="col-sm-12 col-lg-12">
					<div class="card card-sm card-borderless border-bottom pb-1">
						<div class="row row-0">
							<div class="col-3 order-md-last">
								<img src="{{ json_get(item['img']) }}" class="w-100 h-100 object-cover card-img-start" alt="{{ item['title'] }}">
							</div>
							<div class="col">
								<div class="card-body p-1">
									<h3 class="card-title d-flex w-100 justify-content-between mt-1">
										<a href="{{ path('app_news_detail', {id:item['id']}) }}" class="h3 tracking-wide mb-1">{{ item['title'] }}</a>
										<small class="text-muted">{{ item['createdAtTime']|qtime }}</small>
									</h3>
								</div>
							</div>
						</div>
					</div>
				</div>
			{% else %}
				<div class="col-sm-12 col-lg-12">
					<div class="card  card-sm card-borderless border-bottom pb-1">
						<div class="row row-0">
							<div class="col-auto">
								<div class="card-body p-1">
									<h3 class="card-title d-flex w-100 justify-content-between mt-1">
										<a href="{{ path('app_news_detail', {id:item['id']}) }}" class="h3 tracking-wide mb-1">{{ item['title'] }}</a>
										<small class="text-muted">{{ item['createdAtTime']|qtime }}</small>
									</h3>
								</div>
							</div>
						</div>
					</div>
				</div>
			{% endif %}
		{% endfor %}
		<div class="col-sm-12 col-lg-12 pagination ">
			{{ macros.pagination(pagination) }}
		</div>
	</div>
{% else %}
	{{ include('@WebsiteBundle/empty.html.twig',{msg:'搜索结果为空!'}) }}
{% endif %}
